<?php

use Illuminate\Routing\Router;

Admin::routes();

Route::group([
    'prefix'        => config('admin.route.prefix'),
    'namespace'     => config('admin.route.namespace'),
    'middleware'    => config('admin.route.middleware'),
    'as'            => config('admin.route.prefix') . '.',
], function (Router $router) {

    $router->get('/', 'HomeController@index')->name('home');
    //优惠规则
    $router->get('ruleShow', 'RuleController@ruleShow')->name('ruleShow');
    $router->get('ruleAdd', 'RuleController@ruleAdd')->name('ruleAdd');
    $router->post('ruleAddDo', 'RuleController@ruleAddDo')->name('ruleAddDo');
    $router->delete('deleteAll', 'RuleController@deleteAll')->name('deleteAll');
    $router->get('excel', 'RuleController@excel')->name('excel');
    //商品
    $router->get('shopShow', 'ShopController@shopShow')->name('shopShow');
    $router->get('shopDetail/{id}', 'ShopController@shopDetail')->name('shopDetail');
    $router->get('orderShow/{id}', 'ShopController@orderShow')->name('orderShow');
    $router->get('addressAdd', 'ShopController@addressAdd')->name('addressAdd');
    $router->post('addressAddDo', 'ShopController@addressAddDo')->name('addressAddDo');
    $router->get('map/{address}', 'ShopController@map')->name('map');


});
